<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title></title>
	<style type="text/css">
		.box{
			width: 200px;
			height: 200px;
			background: red url() 0 0 no-repeat;
			margin: 10px;
		}
	</style>
	<script type="text/javascript">
		window.onload = function  () {
			box = document.getElementById('box');

			data = box.innerHTML;
			// alert(box.textContent)

			box1 = document.getElementById('box1');

			box1.innerHTML=data;

			img = document.getElementById("img");

			// alert(img.src)

			aa = document.getElementById("aa");

			abc = document.getElementsByClassName('abc')

			alert(abc[0].setAttribute('name',"888"))

		}
	</script>
	
</head>
<body>
	<div  class="box" id="box"><p>学并思<span>网站</span></p></div>
	<div class="box" id="box1"></div>
	<a href="http://www.baidu.com" class="abc" id="aa" xbs="学并思" ></a>
	<img src="https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png" id="img" class="imgclass" alt="" >
</body>
</html>